﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" EnableViewState="false"
    Inherits="System.Web.Mvc.ViewPage<Gman.WebApp.Models.MaterialModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


    <script src="../../Scripts/Binding/Material.js" type="text/javascript"></script>

    <script type="text/javascript">
        var guid = "<%= Model.ID.ToString()%>";
        var action = "<%= Model.Action.ToString()%>";

        $(document).ready(function() {
            SetupControls();
            SetupActions();

        });


    </script>



    <div style="margin-top: 5px;">
        <div class="DataTop">
            <div class="DataTopLeft">
            </div>
            <div class="DataTopRight">
            </div>
        </div>
        <div class="DataContent">
            <div class="DataContentRight" style="height: 50px;">
                <b>Materiales/Productos </b>
                <% Html.RenderPartial("ToolBar", Model.ToolBar); %>
            </div>
        </div>
        <div class="DataBottom">
            <div class="DataBottomLeft">
            </div>
            <div class="DataBottomRight">
            </div>
        </div>
    </div>
    <div class="DataContent">
        <div class="DataContentRight">
            <div class="DataTable">
                <fieldset>
            <%--
                    <table>
                        <tr>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Sede</div>
                            </td>
                            <td style="width: 250px" >
                                <div>
                                    <%= Html.DropDownListFor(model => model.Material.IDSede, Model.Sedes, new { style = "width: 150px;", propertyname = "Material.IDSede" })%>
                                </div>
                            </td>
                            
                             <td style="width: 150px;">
                                <div class="editor-label">
                                    Tipo Material</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    <%= Html.DropDownListFor(model => model.Material.TipoMate, Model.Tipo, new { style = "width: 250px;", propertyname = "Material.TipoMate" })%>
                                </div>
                            </td>
                            
                            
                        </tr>
                        <tr>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Familia</div>
                            </td>
                            <td style="width: 300px">
                                <div>
                                    <%= Html.DropDownListFor(model => model.Material.FamiMate, Model.Femilia, new { style = "width: 250px;", propertyname = "Material.FamiMate" })%>
                                </div>
                            </td>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Sub Familia</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    <%= Html.DropDownListFor(model => model.Material.SubFamiMate, Model.SubFemilia, new { style = "width: 250px;", propertyname = "Material.SubFamiMate" })%>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Categoria</div>
                            </td>
                            <td style="width: 300px">
                                <div>
                                    <%= Html.DropDownListFor(model => model.Material.CatMate, Model.Categoria, new { style = "width: 250px;", propertyname = "Material.CatMate" })%>
                                </div>
                            </td>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Sub Categoria</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    <%= Html.DropDownListFor(model => model.Material.SubCatMate, Model.SubCategoria, new { style = "width: 250px;", propertyname = "Material.SubCatMate" })%>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Material
                                </div>
                            </td>
                            <td colspan="4">
                                <div>
                                    <%= Html.TextBoxFor(model => model.Material.DescMate, new { style = "width: 550px;", propertyname = "Material.DescMate" })%>
                                    <img id="btnBuscar" src="../../_Images/Search-icon-16.png" alt="Buscar material"
                                        style="cursor: pointer;" />
                                </div>
                            </td>
                            <td>
                            </td>
                        </tr>
                           <tr>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Unidad Medida</div>
                            </td>
                            <td style="width: 300px">
                                <div>
                                    <%= Html.TextBoxFor(model => model.Material.UniMedMate, new { style = "width: 250px;", propertyname = "Material.UniMedMate" })%>
                                </div>
                            </td>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Saldo ACtual</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    <%= Html.TextBoxFor(model => model.Material.SaldActMate, new { style = "width: 250px;", propertyname = "Material.SaldActMate" })%>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Costo Promedio (S/.)</div>
                            </td>
                            <td style="width: 300px">
                                <div>
                                    <%= Html.TextBoxFor(model => model.Material.CostoPromMate, new { style = "width: 250px;", propertyname = "Material.CostoPromMate" })%>
                                </div>
                            </td>
                            <td>
                                <div class="editor-label">
                                    Precio Promedio(S/.)</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    <%= Html.TextBoxFor(model => model.Material.PrecPromMate, new { style = "width: 250px;", propertyname = "Material.PrecPromMate" })%>
                                </div>
                            </td>
                        </tr>
                        
                          <tr>
                            <td style="width: 150px;">
                                <div class="editor-label">
                                    Stock Minimo</div>
                            </td>
                            <td style="width: 300px">
                                <div>
                                    <%= Html.TextBoxFor(model => model.Material.StckMinMate, new { style = "width: 250px;", propertyname = "Material.StckMinMate" })%>
                                </div>
                            </td>
                            <td>
                                <div class="editor-label">
                                    Stock Reposicion</div>
                            </td>
                            <td style="width: 450px">
                                <div>
                                    <%= Html.TextBoxFor(model => model.Material.StckRepoMate, new { style = "width: 250px;", propertyname = "Material.StckRepoMate" })%>
                                </div>
                            </td>
                        </tr>
                    </table>
                    --%>
             
                 <div id="AddEditDiv">
                         <% Html.RenderPartial("~/Views/Material/AddEditMaterial.ascx", Model); %>
                 </div>
                </fieldset>
            </div>
        </div>
          <div class="DataContent">
                <div class="DataContentRight" style="height: 300px;">
                    <br />
                    <div id="ListaMaterialesDiv">
                        <% Html.RenderPartial("ListaMateriales", Model); %>
                    </div>
                </div>
            </div>

    </div>
</asp:Content>
